<?php
$oUsers = UserHandler::getUsers();
$sClientUsers = ClientHandler::getUsers($_REQUEST['iClientgroup']);
?>
<div id="layer_client_useradd" class="hidden" style="visibility: visible;">
<form action="index.php" method="post" name="form_client_useradd">
<input type="hidden" name="sAction" value="client-useradd">
<input type="hidden" name="sView" value="client-list">
<input type="hidden" name="iClientgroup" value="<?php print $_REQUEST['iClientgroup'] ?>">
<table class="boxborder" cellspacing="0">
	<tr>
		<td class="boxhandle" colspan="2"><?php print msg('Add user') ?></td>
	</tr>
	<tr>
		<td class="fieldname"><?php print msg('User') ?>:</td>
		<td class="fieldvalue">
			<select name="iUser" id="focus_client_useradd">
<?php
foreach ($oUsers as $iID => $oUser)
{
	if (isset($sClientUsers[$iID]))
	{
		continue;
	}
	echo '<option value="'.$iID.'">'.$oUser->sUser.'</option>';
}
?>
			</select>
		</td>
	</tr>
	<tr>
		<td class="fieldname"><?php print msg('Admin') ?>:</td>
		<td class="fieldvalue"><input type="checkbox" name="bAdmin"></td>
	</tr>
	<tr>
		<td class="boxbody center" colspan="2">
			<input type="submit" value="<?php print msg('OK') ?>">
			<input type="button" value="<?php print msg('Cancel') ?>" onClick="layerHide('layer_client_useradd');">
		</td>
	</tr>
</table>
</form>
</div>
